package com.nuaa.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.nuaa.dao.change.inter.ExpDaoInter;
import com.nuaa.domain.change.ExpEntity;
import com.nuaa.service.inter.ExpService;
import com.nuaa.utils.DataGrid;
import com.nuaa.utils.PageInfo;

@Service("expService")
public class ExpServiceImpl implements ExpService{

	@Resource
	private ExpDaoInter expDao;
	
	@Override
	public DataGrid<ExpEntity> getByOrderNo(String orderNo, PageInfo pager) {
		long totalNum = expDao.countbyOrderNo(orderNo);
		int[] fm = pager.getFirstindexAndMaxindex();
		List<ExpEntity> list = expDao.selectByOrderNo(orderNo, fm[0], fm[1]);
		return new DataGrid<ExpEntity>(totalNum, list);
	}

}
